/**
 * Created by zhanheng on 2017/3/1.
 */
import {getWithoutAuth} from '../../frame/ajax'
import {getUrl} from '../../frame/apiConfig'
/**
 * 获取鼓励师课程列表请求
 */
export const loadPyramidCourseList = ({dispatch}) => {
  return new Promise(
    (resolve, reject) => {
      getWithoutAuth(
        {
          url: getUrl('pyramid_course_list')
        }
      ).then(
        pyramidCourseList => {
          dispatch('LOAD_PYRAMID_COURSE_LIST', pyramidCourseList)
          resolve(pyramidCourseList)
        }
      ).catch(
        err => {
          reject(err)
        }
      )
    }
  )
}
